package com.unism.deviceType;

public enum DeviceType {// 实例对象类型编号
	PUMPWELL("机井",1), 
			WEDOUBLECONTROL("井电双控",2), 
			FERTILIZERTANK("施肥灌",3), 
			FILTER("过滤器",4),
			WEATHERSTATIONS("气象站",5),
			MOISTURESTATION("墒情站",6),
			WATERSTATION("水位站",7),
			NUTRIENTSTATION("养分站",8),
			ENVIRONMENTSTATION("环境站",9),
			OUTGROUNDPILE("出地桩",10),
			OUTDOORGATEWAYS("室外网关",11),
			MAIN_PIPE("主干管",12),
			SUB_PIPE("分干管",13),
			BRANCH_PIPE("支管",14),
			PUMST("首部",15),
			SUB_PIPE_CONTROL("分干管控制",16),
			WATER_QUALITY("水质站",17),
			MOISTURE_UWS_STATION("墒情uws",18);
	
	
	private String name;
	private Integer deviceType;
	
	
	private DeviceType(String name, Integer deviceType) {
		this.name = name;
		this.deviceType = deviceType;
	}

	public static DeviceType valueOf(Integer deviceType) {
		for (DeviceType element : DeviceType.values()) {
			if (deviceType == element.getDeviceType()) {
				return element;
			}
		}
		return null;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getDeviceType() {
		return deviceType;
	}

	public void setDeviceType(Integer deviceType) {
		this.deviceType = deviceType;
	}
	
	
}
